﻿using Lanbt.Core.Entity.Dto;
using Lanbt.Core.Entity.Dto.lanbt_power;
using Lanbt.Core.Entity.Dto.lanbt_role;
using Lanbt.Core.Entity.EntityDB;

namespace Lanbt.Core.Service.SqlService.IService
{
    public interface IRoleService
    {
        /// <summary>
        /// 生成当前用户角色下拉框
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<ResultOutput<IList<XM_SelectOutput>>> QueryRolesByUserId(string userId);

        /// <summary>
        /// 分页查询角色
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagesResultOutput<lanbt_role>> QueryPagesRole(QueryPagesRoleInput input);

        /// <summary>
        /// 通过ID获取角色权限树形数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultOutput<IList<TreeData>>> QueryRolePowerTreedata(string id);

        /// <summary>
        /// 添加角色
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        Task<ResultOutput<string>> Insert(string name);

        /// <summary>
        /// 通过ID删除角色
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultOutput<string>> DeleteById(string id);

        /// <summary>
        /// 通过ID批量删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<ResultOutput<string>> DeleteByIds(List<string> ids);

        /// <summary>
        /// 根据id修改角色
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<ResultOutput<string>> Update(UpdateRoleInput input);

        /// <summary>
        /// 修改角色权限Ids
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<ResultOutput> UpdatePowerIdsById(UpdatePowerIdsByIdInput input);
    }
}
